<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<input type="button" value="按钮" onclick="f1()">
<script>
  /*1.无参无返回值*/
  function f1(){
    console.log("f1");
  }
  f1();

  /*2.有参无返回值*/
  function f2(name,age){
    console.log(name + "," + age);
  }
  f2("王冰冰",23);

  /*无参有返回值*/
  function f3(){
    return "王冰冰";
  }
  let info = f3();
  console.log(info);

  function f4(x,y){
    return x*y;
  }
  let result = f4(3,3);
  console.log(result);

  let f5 = function (name,age){
    console.log(name + "," + age);
  }
  f5("张扬",24);

  let f6 = new Function("name","age","console.log(name + ':' + age)");
  f6("石原里美",44);
</script>
</body>
</html>